#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QThread>
#include <QVector>
#include <QtGlobal>
#include <QDebug>
#include <QObject>

//生成随机数
class Generate : public QObject
{
    Q_OBJECT
public:
    explicit Generate(QObject *parent = nullptr);

public:
    void working(int num) ;

signals:
    void sendArray(QVector<int> num);


};

class BubbleSort : public QObject
{
    Q_OBJECT
public:
    explicit BubbleSort(QObject *parent = nullptr);


public:
    void working(QVector<int> list) ;

signals:
    void Finish_Array(QVector<int> num);


};


class QuickSort : public QObject
{
    Q_OBJECT
public:
    explicit QuickSort(QObject *parent = nullptr);

public:
    void working(QVector<int> list) ;
private:
    void quickSort(QVector<int> &list,int l ,int r);  //对list里起始位置l，结束位置r，进行排序

signals:
    void Finish_Array(QVector<int> num);
};






#endif // MYTHREAD_H
